package com.sms.util;

import java.util.List;
import java.util.Map;

import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;

public class SpringJdbc {
	public static JdbcTemplate jdbcTemplate=getJdbcTemplate();
	protected static JdbcTemplate getJdbcTemplate(){
		return (JdbcTemplate) new ClassPathXmlApplicationContext("applicationContext.xml").getBean("jdbcTemplate");
	}
	protected static final int maxReadNum = ReadProperties.getPropertyByInt("maxReadNum");
	protected static final String linkType = ReadProperties.getPropertyByStr("linkType");
	protected static final String isAbleOtherMobile = ReadProperties.getPropertyByStr("isAbleOtherMobile");
	@SuppressWarnings("unchecked")
	public static final List<Map<String,String>> keywords=jdbcTemplate.queryForList("select KEYWORDS_NAME,IS_REPLACE,REPLACE from SMS_KEYWORDS where IS_REPLACE='00Y'");
}
